package com.ruoyi.teaching.mapper;

import java.util.List;

import com.ruoyi.teaching.domain.YaHolidayConfig;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 节假日配置Mapper接口
 *
 * @author ruoyi
 * @date 2025-08-29
 */
@Mapper
public interface YaHolidayConfigMapper {
  /**
   * 查询节假日配置
   *
   * @param id 节假日配置主键
   * @return 节假日配置
   */
  public YaHolidayConfig selectYaHolidayConfigById(Long id);

  /**
   * 查询节假日配置列表
   *
   * @param yaHolidayConfig 节假日配置
   * @return 节假日配置集合
   */
  public List<YaHolidayConfig> selectYaHolidayConfigList(YaHolidayConfig yaHolidayConfig);

  /**
   * 新增节假日配置
   *
   * @param yaHolidayConfig 节假日配置
   * @return 结果
   */
  public int insertYaHolidayConfig(YaHolidayConfig yaHolidayConfig);

  /**
   * 修改节假日配置
   *
   * @param yaHolidayConfig 节假日配置
   * @return 结果
   */
  public int updateYaHolidayConfig(YaHolidayConfig yaHolidayConfig);

  /**
   * 删除节假日配置
   *
   * @param id 节假日配置主键
   * @return 结果
   */
  public int deleteYaHolidayConfigById(Long id);

  /**
   * 批量删除节假日配置
   *
   * @param ids 需要删除的数据主键集合
   * @return 结果
   */
  public int deleteYaHolidayConfigByIds(Long[] ids);

  /**
   *  根据年份删除节假日配置
   * @param year
   */
  @Delete("delete from ya_holiday_config where year=#{year}")
  void deleteYaHolidayConfigByYear(@Param("year") String year);
}
